package collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        System.out.println(c);
        System.out.println(c.size());
        System.out.println(c.isEmpty());
        c.clear();
        System.out.println(c);
        System.out.println(c.size());
        System.out.println(c.isEmpty());

        c.add(new Point(1,2));
        c.add(new Point(2,2));
        c.add(new Point(13,2));
        c.add(new Point(14,2));
        c.add(new Point(15,2));
        c.add(new Point(16,2));
        System.out.println(c);

        Point p = new Point(1,2);
        boolean contains = c.contains(p);
        System.out.println(contains);
    }
}
